home *** CD-ROM | disk | FTP | other *** search
- Path: web.cae.ca!usenet
- From: fraserh@cae.ca (Fraser Hutchinson)
- Newsgroups: comp.lang.c++
- Subject: Re: Help on assignment
- Date: 1 Mar 1996 18:04:09 GMT
- Organization: CAE Electronics Ltd.
- Message-ID: <4h7e6p$qaf@web.cae.ca>
- References: <4gdmjm$1kr@cloner4.netcom.com> <312B94AA.5624@connix.com>
- NNTP-Posting-Host: pch63.cae.ca
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.7
-
-
- In article <312B94AA.5624@connix.com>, shawley@connix.com says...
- >
- >I would do your home work but I will give a couple of hints.
- >
- >> Write a function that normally takes one argument, the address of a
- >> string, and prints that string once. However, if a second, type int
- >> argument is provided and is greater than zero, the function prints the
- >> string the number of times equal to the number of times indicated.
-
- Normally, I would not do someone's homework, but I have to challenge this! :)
-
-
- >hint: int main(int argc, char **argv)
-
- nope! Function! Not program!
-
- try
- void printme(char *string, int times = 1)
-
-
- >
- >> Second one is
- >> Write a function called zerosmaller that is passed to two int arguments
- >> by reference and then sets the smaller of the two numbers to 0. Write a
- >
- >hint: void set_smaller(int& val1, int& val2)
-
- OK, you get an A for this :):):):)
-
- Fraser
-
-
-